<div class="customContainer">
    <form class="form-horizontal" name="articleForm" action="javascript:void(0)" novalidate>
        <div class="article" style="padding-bottom: 5px;">
            <div class="article-header" style="margin-top: 20px;">
                <div class="form-group">
                    <div class="col-sm-12">
                        <input type="text" class="form-control"
                               style="height: 40px;font-size: 16px;" placeholder="请输入文章标题，禁止包含@或者.等特殊符号"
                               name="title" ng-model="article.title" required/>
                    </div>
                </div>
            </div>
            <div class="article-body">
                <div class="form-group article-editor-div">
                    <div class="col-sm-12">
                        <div id="article-editormd" style="margin-bottom: 0">
                            <textarea style="display:none;"></textarea>
                        </div>
                    </div>
                </div>
                <div class="article-other-div" style="display: none">
                    <div class="form-group">
                        <label class="control-label col-sm-2"
                            style="text-align: left;padding-right: 0">类别</label>
                        <div class="col-sm-12">
                            <!-- col-xs-12 style="width: 200px" -->
                            <div class="col-xs-8 col-sm-9 col-md-10" style="padding: 0"><select class="form-control"
                                                                                                ng-model="article.categoryIds"
                                                                                                ng-options="cate.id as cate.name for cate in categorys"
                                                                                                required>
                                <option value="">请选择类别</option>
                            </select></div>
                            <div class="col-xs-4 col-sm-3 col-md-2" style="padding: 0">
                                <button ng-click="newCategory()" class="btn btn-block btn-default">新建分类</button>
                            </div>
                        </div>
                    </div>
                    <div class="form-group" style="margin-bottom:0">
                        <label class="control-label col-sm-2"
                            style="text-align: left;padding-right: 0">标签</label>
                        <div class="col-sm-12" style="padding: 13px;">
                            <span ng-if="!selectedTagNames">无</span>
						<span ng-repeat="tName in selectedTagNames"><span
                                style="background-color: #EEEEEE;font-size:14px;padding:5px;padding-bottom:2px;margin: 2px;"><span
                                style="margin-right:5px;" ng-bind="tName"></span><a title="删除标签"
                                                                                    href="javascript:void(0)"
                                                                                    ng-click="deleteTagName(tName)"><span
                                class="glyphicon glyphicon-remove"></span></a></span></span>

                        </div>
                    </div>
                    <div class="form-group">
                        <!--<div class="col-sm-2"></div>-->
                        <div class="col-sm-12">
                            <div class="col-xs-8 col-sm-9 col-md-10" style="padding:0">
                                <input type="text" class="form-control" ng-model="tagName"
                                       maxlength="11" onkeyup="value=this.value.replace(/[\/]/,'')"
                                       placeholder="输入标签，限10个字符，加;号结束,禁止包含/"> <input
                                    type="text" class="form-control" ng-model="article.tagNames"
                                    style="display:none;">
                            </div>
                            <div class="col-xs-4 col-sm-3 col-md-2 pull-right" style="padding:0">
                                <button ng-if="!isSelectExists" class="btn btn-default btn-block"
                                        ng-click="selectExists(0)">选择标签
                                </button>
                                <button ng-if="isSelectExists" class="btn btn-primary btn-block" style="margin: 0"
                                        ng-click="selectExists(1)">确定
                                </button>
                            </div>
                        </div>
                    </div>
                    <div class="form-group" ng-if="isSelectExists">
                        <!--<div class="col-sm-2"></div>-->
                        <div class="col-sm-12">
                            <div class="row"
                                 style="border:1px solid #EBEBEB;padding:10px;background-color: #EBEBEB">
                                <div class="col-sm-12 tagsCheckbox" style="padding:0">
                                    <p style="margin-bottom:0;font-size:12px;">选择以下已经存在的标签，勾选后点击确认按钮</p>
                                    <label class="checkbox-inline" ng-if="!tag.isCheck"
                                           ng-repeat="tag in tags"> <input type="checkbox"
                                                                           ng-click="changeChecked(tag)"
                                                                           title="{{tag.name}}"
                                                                           value="{{tag.id}}">{{tag.name}}
                                    </label>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-sm-2"
                            style="text-align: left;padding-right: 0">摘要</label>
                        <div class="col-sm-12">
						<textarea class="form-control" required ng-model="article.summary"
                                  name="" rows="6" style="resize:none"
                                  placeholder="请简述文章的摘要（限300字符以内）"></textarea>

                            <p style="text-align:right;color: #8D8D8D;font-size:12px">已输入100字符</p>
                        </div>
                    </div>
                    <!-- <div class="form-group">
                        <label class="control-label col-sm-2"
                            style="text-align: center;padding-right: 0">更多</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" name=""
                                placeholder="请输入同类文章的url，输入后点击添加按钮">

                        </div>
                        <div class="col-sm-2">
                            <button class="btn btn-default">添加</button>
                        </div>
                    </div> -->
                </div>
            </div>
            <div class="article-footer" style="text-align: right">
                <button onclick="javascript:history.back()" class="btn btn-danger">取
                    消
                </button>
                <a href="" class="btn btn-primary" ng-if="nowIsLast" ng-click="preStep()">上一步</a>
                <a href="" class="btn btn-primary" ng-if="nowIsFirst" ng-click="nextStep()">下一步</a>
                <input type="hidden" class="form-control"value="0" ng-model="article.status">
                <!--ng-disabled="!article.title"-->
                <button type="button" ng-click="saveOrUpdate(0)"
                        class="btn btn-warning">存 为 草 稿
                </button>
                <!--ng-disabled="articleForm.$invalid"-->
                <button type="submit" ng-click="saveOrUpdate(1)" ng-if="nowIsLast"
                        class="btn btn-success">发 布 博 文
                </button>
            </div>
        </div>
    </form>
</div>
<script src="plugins/editor.md/editormd.js"></script>
<style>
    select option {
        height: 40px;
    }
</style>
